<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>
<header id="head">
	<div class="container">
		<div class="row">
			<h1 class="lead">欢迎来到书友的世界</h1>
			<p class="tagline">我读书越多，书籍就使我和世界越接近，生活对我也变得越加光明和有意义。——高尔基</a></p>
		</div>
	</div>
</header>
<!-- Intro -->
<!--
<div class="container text-center">
	<br> <br>
	<h2 class="thin">The best place to tell people why they are here</h2>
	<p class="text-muted">
		The difference between involvement and commitment is like an eggs-and-ham breakfast:<br>
		the chicken was involved; the pig was committed.
	</p>
</div>
-->
<!-- /Intro-->

<div class="container text-center">
    <div class="jumbotron top-space">
        <video id="player" controls="controls">
            <source src="<?php echo Yii::app()->request->baseUrl; ?>/videos/default.mp4" "type"="video/mp4" >测试视频</source>  <!-- 提供默认的播放视频  -->
        </video>

    </div>
</div>

<?php if(count($model) >= 1): ?>
<!-- Highlights - jumbotron -->
<div class="jumbotron top-space">
	<div class="container">

		<h3 class="text-center thin">票数Top4的图书</h3>

		<div class="row">
	<?php if(count($model) >= 1): ?>
			<div class="col-md-3 col-sm-6 highlight">
            <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$model[0]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($model[0]->bookname), array('/book/view', 'id'=>$model[0]->id)); ?><?php echo  '  票数'.$model[0]->vote; ?></h4></div>

				<div class="h-body text-center">
                <p><?php echo $model[0]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
	<?php if(count($model) >= 2): ?>
			<div class="col-md-3 col-sm-6 highlight">
                <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$model[1]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($model[1]->bookname), array('/book/view', 'id'=>$model[1]->id)); ?><?php echo  '  票数'.$model[1]->vote; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $model[1]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
	<?php if(count($model) >= 3): ?>
			<div class="col-md-3 col-sm-6 highlight">
                <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$model[2]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($model[2]->bookname), array('/book/view', 'id'=>$model[2]->id)); ?><?php echo  '  票数'.$model[2]->vote; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $model[2]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
	<?php if(count($model) >= 4): ?>
			<div class="col-md-3 col-sm-6 highlight">
            <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$model[3]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($model[3]->bookname), array('/book/view', 'id'=>$model[3]->id)); ?><?php echo  '  票数'.$model[3]->vote; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $model[3]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
		</div> <!-- /row  -->

	</div>
</div>
<!-- /Highlights -->

<!-- Highlights - jumbotron -->
<div class="jumbotron top-space">
	<div class="container">

		<h3 class="text-center thin">浏览次数Top4的图书</h3>

		<div class="row">
	<?php if(count($modelBrowsertimes) >= 1): ?>
			<div class="col-md-3 col-sm-6 highlight">
            <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$modelBrowsertimes[0]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($modelBrowsertimes[0]->bookname), array('/book/view', 'id'=>$modelBrowsertimes[0]->id)); ?><?php echo  '  浏览次数'.$modelBrowsertimes[0]->browsertimes; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $modelBrowsertimes[0]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
	<?php if(count($modelBrowsertimes) >= 2): ?>
			<div class="col-md-3 col-sm-6 highlight">
                <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$modelBrowsertimes[1]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($modelBrowsertimes[1]->bookname), array('/book/view', 'id'=>$modelBrowsertimes[1]->id)); ?><?php echo  '  浏览次数'.$modelBrowsertimes[1]->browsertimes; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $modelBrowsertimes[1]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
	<?php if(count($modelBrowsertimes) >= 3): ?>
			<div class="col-md-3 col-sm-6 highlight">
                <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$modelBrowsertimes[2]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($modelBrowsertimes[2]->bookname), array('/book/view', 'id'=>$modelBrowsertimes[2]->id)); ?><?php echo  '  浏览次数'.$modelBrowsertimes[2]->browsertimes; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $modelBrowsertimes[2]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
	<?php if(count($modelBrowsertimes) >= 4): ?>
			<div class="col-md-3 col-sm-6 highlight">
            <div class="h-caption"><h4><i class="fa fa-5">
<?php echo '<img src="'.Yii::app()->request->baseUrl.'/images/'.$modelBrowsertimes[3]->picture.'" style="height:300px;" />'; ?></i><?php echo CHtml::link(CHtml::encode($modelBrowsertimes[3]->bookname), array('/book/view', 'id'=>$modelBrowsertimes[3]->id)); ?><?php echo  '  浏览次数'.$modelBrowsertimes[3]->browsertimes; ?></h4></div>
				<div class="h-body text-center">
                <p><?php echo $modelBrowsertimes[3]->abstract; ?></p>
				</div>
			</div>
                <?php endif; ?>
		</div> <!-- /row  -->

	</div>
</div>
<?php endif; ?>
<!-- /Highlights -->
